namespace PersonalHealth.Data.Model
{
    using System;
    using System.Collections.Generic;
    using Core.Model;

    public partial class Message : SynchronizeItem
    {
        public int MsgTypeId { get; set; }
        public int FromUserId { get; set; }
        public int ToUserId { get; set; }
        public string Title { get; set; }
        public string Msg { get; set; }
        public bool NotRead { get; set; }

    
        public virtual User FromUser { get; set; }
        public virtual User ToUser { get; set; }

        public virtual MessageType MessageType
        {
            get
            {
                messageType = (MessageType)MsgTypeId;
                return messageType;
            }
            set
            {
                MsgTypeId = (int)value;
                messageType = value;
            }
        }

        private MessageType messageType;
    }
}
